The present invention relates to a method and device for setting filter coefficients, and a sampling frequency converting method and devices using these filter coefficient setting method and device.
In general, digital signal processing systems for use in digital audio apparatuses are constructed to process digital signals of a predetermined sampling frequency. However, with recent development of multimedia technology, it sometimes becomes necessary to allow the digital signal processing systems to process digital signals of a different sampling frequency from the predetermined sampling frequency. To this end, a sampling frequency convertor device has so far been employed which converts the sampling frequency of the digital signals to properly fit the nature of processing to be performed by the digital signal processing system.
In FIG. 10, there is shown an exemplary setup of such a conventional sampling frequency convertor device. As shown, this convertor device comprises a filter 1, an interpolation filter 2, a coefficient memory 3 and a selector section 4. The interpolation filter 2 is provided to interpolate between input digital signals, passed through the filter 1, on the time axis, so as to convert them into digital signals of an intended sampling frequency. The interpolation by the interpolation filter 2 may be a linear interpolation between every two samples, polynomial interpolation using several samples at a time (e.g., using Lagrangian function), spline interpolation or the like.
The filter 1 preceding the interpolation filter 2 operates to previously eliminate, from the input digital signals, high-frequency spectral components that would cause unwanted aliasing noise. For example, in a case where the intended sampling frequency after the conversion (after-conversion sampling frequency) is “f2”, if the input digital signal waveform passed to the interpolation filter 2 contains spectral components higher than f2/2, these spectral components would cause aliasing noise. Thus, to prevent such unwanted aliasing noise from being produced from the interpolation filter 2, the filter 1 is provided to eliminate the spectral components higher than the f2/2 frequency.
In the conventional sampling frequency converter device, the high-frequency-components eliminating process by the filter 1 is carried out by convoluting a time series of filter coefficients into a time-series of input digital signals, and the cutoff frequency used for the high-frequency-components eliminating process is determined from the sampling frequency of the input digital signals and the filter coefficient time series used for the convolution. Namely, given filter coefficients that provide a cutoff frequency “fc” when convoluted into input digital signals of sampling frequency “fa”, then the high cutoff frequency when the filter coefficients are convoluted into input digital signals of sampling frequency “fb” will be “fc·(fb/fa)”.
Thus, if input digital signals of various sampling frequencies f1 are supplied, it is necessary to switch from one filter coefficient time series to another depending on the individual sampling frequencies f1, even where the after-conversion sampling frequency f2 is fixed at a given frequency. Similarly, when input digital signals of a single sampling frequency f1 are to be converted to assume a plurality of sampling frequencies f2, it is necessary to switch from one filter coefficient time series to another depending on the individual intended sampling frequencies f2.
Therefore, in the sampling frequency convertor device shown in FIG. 10, the coefficient memory 3 has prestored therein various time series of filter coefficients corresponding to various possible ratios between the after-conversion sampling frequency f2 and the before-conversion sampling frequency f1 of the input digital signals; each of such ratios will hereinafter referred to as a conversion ratio k (k=f2/f1). In the sampling frequency conversion, one of the time series of filter coefficients corresponding to the conversion ratio k is selected to be read out from the coefficient memory 3 by means of the selector section 4 and then set in the filter 1 for use thereby.
Thus, the conventionally-known sampling frequency convertor device is able to perform sampling frequency conversion at various conversion ratios, which, however, requires not only determination of the various time series of filter coefficients corresponding to the various possible conversion ratios but also storage of the determined time series in the coefficient memory 3. Consequently, if the number of the conversion ratios is great, the coefficient memory 3 must be of a great capacity to store many time series of filter coefficients corresponding to the conversion ratios.
In the event that such a great-capacity coefficient memory 3 can not be used, fewer time series of filter coefficients corresponding to some representative conversion ratios are prestored in the coefficient memory 3 so that one of the time series closest to a desired conversion ratio is selected to be used in the sampling frequency conversion. However, this approach would encounter the following problems due to disagreement between a half (½) of the after-conversion sampling frequency f2 and the high cutoff frequency fc.
If the high cutoff frequency fc of the filter 1 is lower than the frequency f2/2, high-frequency spectral components are eliminated from the waveform of input digital signals more than necessary, which would lead to deterioration of reproduced sound quality and the like. FIG. 11 illustratively shows such an inconvenience, in which reference character A represents a spectrum of the waveform of input digital signals supplied to the filter 1, reference character B represents a spectral range over which no aliasing noise results from the sampling frequency conversion by the interpolation filter 2, and reference character C represents a spectral range of the waveform of the digital signals passed through the filter 1. In this example, the high cutoff frequency fc of the filter 1 is set to a frequency f1/4 lower than the frequency f2/2, so that spectral components within a frequency range from f1/4 to f2/2 are eliminated although these components would not cause aliasing noise and hence need not be eliminated.
Conversely, if the high cutoff frequency fc of the filter 1 is higher than the half of the frequency f2/2, input digital signals containing spectral components higher than the frequency f2/2 may be passed to the interpolation filter 2, and hence aliasing noise would result from the sampling frequency conversion performed by the interpolation filter 2. FIG. 12 illustratively shows such an inconvenience. In this illustrated example, the high cutoff frequency fc of the filter 1 is set to a frequency f1/4 higher than the frequency f2/2, so that spectral components within a frequency range from f2/2 to f1/4 would be passed to the interpolation filter 2 without being eliminated by the filter 1. As a result, unwanted aliasing noise would result from the sampling frequency conversion to the sampling frequency f2 performed by the interpolation filter 2.
To avoid the above-discussed inconveniences, such a filter is required which can adjust, as desired, the high cutoff frequency fc of the filter 1 in correspondence to every possible conversion ratio. However, due to a limited storage capacity of the coefficient memory 3, it has been extremely difficult to realize a filter that can appropriately meet such a requirement.
Further, it has been conventionally known, in the art of digital filters, to interpolate between prestored filter coefficients to thereby generate filter coefficients at shorter intervals than the prestored filter coefficients. However, the conventional filter interpolating techniques can not freely vary filter characteristics to be achieved, and can just prestore fewer filter coefficients than those necessary for the filter characteristics to be achieved and make up for the insufficiency by interpolating between prestored filter coefficients. Consequently, in order to achieve a plurality of different filter characteristics, it was absolutely necessary to prestore a plurality of series of filter coefficients corresponding to the number of the filter characteristics to be achieved.